<template>
  <div class="">
    <button @click="$router.go(-1)">回退上一页</button>
    <img :src="'https://elm.cangdu.org/img/' + info.image_path" alt="" />
    <h3>{{ info.name }}</h3>
    <h6>{{ info.address }}</h6>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
import { useStore } from "vuex";
import { useRouter, useRoute } from "vue-router";
import { getInfo } from "../utils/ele";

export default {
  setup(props, ctx) {
    const store = useStore();
    const router = useRouter();
    const route = useRoute();
    const data = reactive({
      info: {},
    });
    let id = route.params.id;
    getInfo(id).then((res) => {
      console.log(res);
      data.info = res;
    });
    //获取店铺详情数据

    return { ...toRefs(data) };
  },
};
</script>

<style lang="scss"></style>
